home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
awe2-0_1.lha
/
awe2-0.1
/
Src
/
RCS
/
CpuMuxExceptions.h,v
< prev
next >
Wrap
Text File
|
1989-02-23
|
3KB
|
193 lines
head 3.2;
branch ;
access ;
symbols ;
locks grunwald:3.2; strict;
comment @ * @;
3.2
date 89.02.20.15.34.05; author grunwald; state Exp;
branches ;
next 3.1;
3.1
date 88.12.20.13.49.38; author grunwald; state Exp;
branches ;
next 1.1;
1.1
date 88.10.30.13.05.36; author grunwald; state Exp;
branches ;
next ;
desc
@@
3.2
log
@Start using Gnu library heaps for schedulers
@
text
@// This may look like C code, but it is really -*- C++ -*-
//
// Copyright (C) 1988 University of Illinois, Urbana, Illinois
//
// written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
//
#ifndef CpuMuxExceptions_h
#define CpuMuxExceptions_h
#include "ExceptionClass.h"
//
// ExceptionByReserve -- Used to reserve a semaphore/barrier/etc
//
class ReserveByException;
class ExceptionReserve : public ExceptionClass {
ReserveByException *toReserve;
public:
ExceptionReserve();
ReserveByException *reserve();
void reserve(ReserveByException *);
virtual void handleException();
};
inline
ExceptionReserve::ExceptionReserve()
{
}
inline ReserveByException *
ExceptionReserve::reserve()
{
return(toReserve);
}
inline void
ExceptionReserve::reserve(ReserveByException *r)
{
toReserve = r;
}
//
// ExceptionTerminate -- used to terminate a thread
//
class Thread;
class ExceptionTerminate : public ExceptionClass {
void **stackOfDeadThread;
public:
ExceptionTerminate();
void terminate(void **);
virtual void handleException();
};
inline
ExceptionTerminate::ExceptionTerminate()
{
}
inline void
ExceptionTerminate::terminate(void **r)
{
stackOfDeadThread = r;
}
//
// ExceptionReschedule -- used to relenquish the CPU. Can also be
// used to move to another CPU (i.e. previous to killing a cpu or
// spawning a CPU)
//
class ExceptionReschedule : public ExceptionClass {
int newCpu;
public:
ExceptionReschedule();
void cpu(int = -1);
virtual void handleException();
};
inline
ExceptionReschedule::ExceptionReschedule()
{
}
inline void
ExceptionReschedule::cpu(int c)
{
newCpu = c;
}
//
// ExceptionIveSuspended -- used when current thread has suspended
// itself and another thread must be scheduled and run.
//
class ExceptionIveSuspended : public ExceptionClass {
public:
ExceptionIveSuspended();
virtual void handleException();
};
inline
ExceptionIveSuspended::ExceptionIveSuspended()
{
}
//
// ExceptionEnrollDismissCpu -- enroll or dismiss a new cpu.
//
class ExceptionEnrollDismissCpu : public ExceptionClass {
int enrollOrDismiss;
public:
void enroll();
void dismiss();
virtual void handleException();
};
inline void
ExceptionEnrollDismissCpu::enroll()
{
enrollOrDismiss = 1;
}
inline void
ExceptionEnrollDismissCpu::dismiss()
{
enrollOrDismiss = 0;
}
#endif /* CpuMuxExceptions_h */
@
3.1
log
@Steay version
@
text
@@
1.1
log
@Initial revision
@
text
@d72 2
a73 1
// used to move to another CPU (i.e. previous to killing a cpu)
d89 6
d97 1
a97 1
// itself an another thread must be run.
d109 23
@